home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5613 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  755 b 

  1. Path: prodigy.com!usenet
  2. From: FSMJ76A@prodigy.com (Stephen Pride)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Sorting a directory
  5. Date: 20 Feb 1996 03:38:44 GMT
  6. Organization: Prodigy Services Company  1-800-PRODIGY
  7. Distribution: world
  8. Message-ID: <4gbfo4$1tiq@useneta1.news.prodigy.com>
  9. References: <4gbbi9$c7s@news1.radix.net>
  10. NNTP-Posting-Host: inugap5.news.prodigy.com
  11. X-Newsreader: Version 1.2
  12.  
  13. Does your C-Library have the functions opendir(), readdir(), closedir()?  
  14. If so,
  15. you can use these to read the directory entries and then use a binary 
  16. tree (or
  17. some other data structure) to sort the entries as they are read.  You 
  18. might also check into the "file tree walk" - ftw() - function (although 
  19. it would probably be a bit more combersome)....
  20.  
  21. Steve
  22.  
  23.